<div class="header">
    <div class="header_main">
        <img src="/static/WebQuant/images/logo_new.png"  class="logo">
        <div class="login_pannel">
             <div class="l_case1">
                欢迎您，请<span class="login">登录</span>|<span class="reg">注册</span>
             </div>
             <div class="l_case2">
                <span class="u_name">{{name}}</span>|<span class="logout">退出</span>
             </div>
        </div>
        <div class="nav">
            {% load NavTag %}
             <ul>
                 {% navtagitem /index "首页" %}
                 {% navtagitem /database "云数据" %}
                 <!-- {% navtagitem /research_tmp/ "云研究" %} -->
                 {% navtagitem /strategy "云策略" %}
                 {% navtagitem /deal/ "云交易" %}
                 {% navtagitem /management/ "云资管" %}
                 <!-- {% navtagitem /college/ "学院" %} -->
                 <!-- <li class="help"> <a href="">帮助<i></i></a> <div class="menu"> </div> </li>  -->
            </ul>
        </div>
    </div>
</div><!-- 头部 -->
<script>
    $.ajax({
      dataType: "jsonp",
      jsonpCallback:"jsonDo",
      url: 'http://quant.999fin.com/web/api/headList',
      success: function(jsons) {
       var h='';
        for(var x in jsons){
         h += '<a href="http://quant.999fin.com/web/doc/' + jsons[x].id + '.html"><div>' + jsons[x].title + '</div></a>';
        }
        $(".header_main .menu").html(h);
      },
      error: function(err) {
        alert('error');
        alert(err);
      }
});
// $(document).ready(function(){
//     var width = $(this).width();
//   if(width<1320){
//    $(".header_main").css("margin-right","20px");
//    $(".login_pannel").css("margin-left","10px");

//   }
//   else{
//    $(".header_main").css("margin-right","6.3%");
//    $(".login_pannel").css("margin-left","5.2%");

//   }
//  });
//  $(window).resize(function() {
//   var width = $(this).width();
//   if(width<1320){
//    $(".header_main").css("margin-right","20px");
//    $(".login_pannel").css("margin-left","10px");

//   }
//   else{
//    $(".header_main").css("margin-right","6.3%");
//    $(".login_pannel").css("margin-left","5.2%");

//   }

//  });
</script>
